<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>正方体</title>
    <style>
        body{
            perspective: 500px;
            transform-style: preserve-3d;
        }
        .box{
            position: relative;
            left: 600px;
            top: 100px;
            transform-style: preserve-3d;
            transform: rotateX(20deg) rotateY(20deg);
        }
        .box div{
            
            position: absolute;
            top: 0;
            left: 0;
            width: 100px;
            height: 100px;
            border: 1px solid blueviolet;
            text-align: center;
            line-height: 100px;
            font-size: 28px;
        }

        .box div:nth-last-child(1){
            transform: rotateX(90deg);
        }
        .box div:nth-last-child(2){
            transform: rotateX(180deg);
        }
    </style>
</head>
<body>
    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
    </div>
</body>
</html>